#ifndef WARRAY_TEST_CUSTOM_TYPE_H_INCLUDE
#define WARRAY_TEST_CUSTOM_TYPE_H_INCLUDE

class custom_type
{
public:
	custom_type() : val(0) {}
	explicit custom_type(int i) : val(i) {}
	int val;
};

inline
bool operator==(const custom_type& l, const custom_type& r)
{
	return l.val == r.val;
}

inline
bool operator!=(const custom_type& l, const custom_type& r)
{
	return l.val != r.val;
}

inline
custom_type operator+(const custom_type& l, const custom_type& r)
{
	return custom_type(l.val+r.val);
}

inline
custom_type operator-(const custom_type& l, const custom_type& r)
{
	return custom_type(l.val-r.val);
}

inline
custom_type operator-(const custom_type& l)
{
	return custom_type(-l.val);
}

inline
custom_type operator*(const custom_type& l, const custom_type& r)
{
	return custom_type(l.val*r.val);
}

inline
custom_type operator/(const custom_type& l, const custom_type& r)
{
	return custom_type(l.val/r.val);
}

inline
std::ostream& operator<<(std::ostream &s, const custom_type& t)
{
	s << t.val;
	return s;
}

#endif
